package dto.utils;

import java.io.Serializable;
import java.util.LinkedList;

import java.util.HashMap;
import java.util.List;

public class DisponibilitaSettimanale implements Serializable{
	
	public static final int DOMENICA = 0;
	public static final int LUNEDI = 1;
	public static final int MARTEDI = 2;
	public static final int MERCOLEDI = 3;
	public static final int GIOVEDI = 4;
	public static final int VENERDI = 5;
	public static final int SABATO = 6;
	
	private HashMap<Integer, List<FasciaOraria>> disp ;
	private PeriodoInattivita periodoInattivita;  
	
	
	public DisponibilitaSettimanale() {
		// TODO Auto-generated constructor stub
		disp = new HashMap<Integer, List<FasciaOraria>>();
		periodoInattivita = new PeriodoInattivita();
		
		for(int i=0 ; i<7; i++){
			disp.put(i,  new LinkedList<FasciaOraria>());
		}
		System.out.println(disp.get(0).size());
	}
	
	public List<FasciaOraria> getListFromDay(int key){
		return disp.get(key);
	}
	
	public void setListFromDay(int key, List<FasciaOraria> list){
		 disp.put(key,list);	
	}
	
	
	public void addSingleFascia(int key , FasciaOraria fascia){
		disp.get(key).add(fascia);
	}
	
	public void removeSingleFascia( int key, FasciaOraria fascia){
		disp.get(key).remove(fascia);
	}
	
	public int getSizeOfList(int key){
		
		return disp.get(key).size();
		
	}


	public PeriodoInattivita getPeriodoInattivita() {
		return periodoInattivita;
	}


	public void setPeriodoInattivita(PeriodoInattivita periodoInattivita) {
		this.periodoInattivita = periodoInattivita;
	}
	
	
	
}
